package com.tcfvic.client;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.tcfvic.client.pojos.Course;
import com.tcfvic.client.pojos.Courselevel;
import com.tcfvic.client.pojos.Employmentdetails;
import com.tcfvic.client.pojos.Employmentstatus;
import com.tcfvic.client.pojos.Expense;
import com.tcfvic.client.pojos.Fundingsource;
import com.tcfvic.client.pojos.Industry;
import com.tcfvic.client.pojos.Jsp;
import com.tcfvic.client.pojos.Logs;
import com.tcfvic.client.pojos.Person;
import com.tcfvic.client.pojos.Personcourse;
import com.tcfvic.client.pojos.Personcoursefundingsource;
import com.tcfvic.client.pojos.Personjsp;
import com.tcfvic.client.pojos.Qualification;
import com.tcfvic.client.pojos.Rto;
import com.tcfvic.client.pojos.Workercompany;
import com.tcfvic.client.pojosInternal.AvailableFunding;

@RemoteServiceRelativePath("person")
public interface PersonService extends RemoteService {

	public List<Person> getAllPersonDetails();

	public Person getPersonDetails(int id);

	public Person savePersonDetails(Person details) throws Exception;

	public void deletePerson(int id) throws Exception;

	public List<Workercompany> getAllCompanies();

	public Workercompany getCompanyDetails(int id);

	public void saveCompanyDetails(Workercompany company) throws Exception;

	public List<Fundingsource> getAllFundingSources();

	public Fundingsource getFundingSourceDetails(int id);

	public void saveFundingSourceDetails(Fundingsource company)
			throws Exception;

	public List<Fundingsource> getPersonFundingSources(int personId);

	// public List<Personcourse> getPersonCoursesByFundingID(int fundingId);

	public List<Course> getAllTraining();

	public Course getTrainingDetails(int id);

	public void saveTrainingDetails(Course company) throws Exception;

	public List<Personcourse> getPersonCourseDetails(int personId);

	public List<Employmentdetails> getAllPersonEmploymentDetails();

	public List<Personcoursefundingsource> getPersonCourseFundingSource(
			int personId);

	public List<Expense> getAllExpenses(Integer personId);

	public Expense getExpense(int id);

	public void saveExpense(Expense expense) throws Exception;

	public void saveExpenses(List<Expense> expenses, boolean deleteFirst)
			throws Exception;

	public List<Courselevel> getAllCourseLevels();

	public void saveCourseLevel(Courselevel courseLevel) throws Exception;

	public List<Rto> getAllRTOs();

	public Rto getRTO(int id);

	public void saveRTO(Rto rto) throws Exception;

	public List<AvailableFunding> getAvailableAmounts(int personId)
			throws Exception;

	public List<Jsp> getAllJSPs();

	public Jsp getJSPDetails(int id);

	public void saveJSPDetails(Jsp jsp) throws Exception;

	public List<Qualification> getAllQualifications();

	public void saveQualification(Qualification qualification) throws Exception;

	public List<String> getAllSuburbs();

	public void deleteCompany(int id) throws Exception;

	public void deleteFundingSource(int id) throws Exception;

	public void deleteCourse(int id) throws Exception;

	public void deleteRto(int id) throws Exception;

	public void deleteJsp(int id) throws Exception;

	List<Employmentstatus> getEmploymentStatus(int personId);

	void saveEmploymentStatus(List<Employmentstatus> expenses,
			boolean deleteFirst) throws Exception;

	void truncateDatabase() throws Exception;

	public List<Industry> getAllIndustries();

	public Industry getIndustryDetails(int id);

	public void saveIndustryDetails(Industry jsp) throws Exception;

	void deleteIndustry(int id);

	public void savePersonJSP(Personjsp personJSP, boolean deleteFirst) throws Exception;
	
	boolean isAdminUser();

	List<Logs> getAllLogs(Date date);

}
